﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Exhibition.RenderTemplete.Controls;
using Exhibition.Common.Helper;
using Exhibition.Service;

namespace Exhibition.Manage
{
    public partial class PayMethod :BaseAdminPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                if (CurrentSite.Id == 0)
                {
                    JsHelper.Alert(this, CommFunMsg.GetMessage("S0001",Lan.zh));
                    return;
                }
                else
                {
                    txtContent.Text = CurrentSite.PayMethod;
                }
            }
        }


        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtContent.Text))
            {

                CurrentSite.PayMethod = txtContent.Text;
                if (CenterService.siteService.Save(CurrentSite) > 0)
                {
                    JsHelper.Alert(this, CommFunMsg.GetMessage("a0001", Lan.zh));
                    return;
                }
                else {
                    JsHelper.Alert(this, CommFunMsg.GetMessage("e0001", Lan.zh));
                    return;
                }
            }
        }
    }
}